Skip to content

feat: resource conflict#976

Merged
AbhishekA1509 merged 15 commits into
mainfrom
feat/resource-conflict-main
Dec 12, 2025
Merged

feat: resource conflict#976
AbhishekA1509 merged 15 commits into
mainfrom
feat/resource-conflict-main

Conversation

@AbhishekA1509

@AbhishekA1509 AbhishekA1509 commented Dec 8, 2025

Copy link
Copy Markdown
Member

Description

This pull request introduces a new feature for handling and resolving resource ownership conflicts during deployments, particularly in Helm-based environments. It adds UI components to display conflicted resources, provides detailed information in a modal, and enables users to take ownership and redeploy directly from the deployment history. Additionally, there are improvements to code organization and minor API enhancements.

Resource Conflict Handling and UI Enhancements:

  • Added ConflictedResourcesTable, ResourceConflictDetailsModal, and ResourceConflictDeployDialog components to display and resolve resource ownership conflicts, including a warning/info block and redeploy action in the deployment history UI. [1] [2] [3] [4] [5] [6]
  • Integrated resource conflict detection and resolution into the TriggerDetails component, showing actionable info blocks and modals when conflicts are present. [1] [2]
  • Added a new route constant for resource conflict details (RESOURCE_CONFLICTS_LIST) in Constants.ts.

Code and API Improvements:

  • Enhanced the generic useQuery hook to support toggling the wrapping of response types, improving flexibility for API calls.
  • Improved sorting and parameter handling in deployment history and trigger output components by introducing and using getSortedTriggerHistory and typed route parameters. [1] [2] [3] [4]

Other Minor Improvements:

  • Refactored artifact ID retrieval and tag details fetching logic for better reliability in TriggerOutput. [1] [2]

These changes collectively improve the user experience for resolving deployment issues related to resource ownership, streamline the codebase, and enhance API handling flexibility.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@AbhishekA1509 AbhishekA1509 self-assigned this Dec 8, 2025
Copilot AI review requested due to automatic review settings December 8, 2025 11:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds resource conflict handling functionality for CD deployments. When a deployment fails due to Helm resource ownership conflicts, users can now view the conflicting resources and redeploy by taking ownership of them.

Key Changes:

  • Added resource conflict detection and display infrastructure with modals and tables
  • Implemented redeploy functionality with ownership takeover capability
  • Enhanced trigger details to show conflict warnings and actions for the latest deployment

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
src/Shared/Helpers.tsx Added getGVKTitle helper to format GVK (Group/Version/Kind) information for display
src/Shared/Components/CICDHistory/utils.tsx Added getSortedTriggerHistory utility to sort trigger history by ID in descending order
src/Shared/Components/CICDHistory/types.tsx Added type definitions for resource conflict modals, API payloads, and data structures
src/Shared/Components/CICDHistory/service.tsx Added API service methods for fetching conflict details and triggering redeployment
src/Shared/Components/CICDHistory/constants.tsx Added error message constant and table column configuration for conflicted resources
src/Shared/Components/CICDHistory/WorkerStatus.tsx Added children prop support to allow rendering additional content
src/Shared/Components/CICDHistory/TriggerOutput.tsx Refactored to use typed URL params and compute latest trigger for conflict detection
src/Shared/Components/CICDHistory/TriggerDetails.tsx Integrated resource conflict UI with info block and modal triggers
src/Shared/Components/CICDHistory/Sidebar.tsx Refactored to use shared sorting utility for trigger history
src/Shared/Components/CICDHistory/ResourceConflictDetailsModal.tsx New modal component to display and manage conflicting resources with redeploy action
src/Shared/Components/CICDHistory/ResourceConflictDeployDialog.tsx New confirmation dialog for resource ownership takeover and redeployment
src/Shared/Components/CICDHistory/ConflictedResourcesTable.tsx New table component to display list of conflicting resources
src/Shared/Components/CICDHistory/ConflictedResourcesTable.scss Styling for the conflicted resources table
src/Common/Constants.ts Added new API route for fetching resource conflicts
src/Common/API/reactQueryHooks.ts Enhanced type parameters to support optional response wrapping

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Shared/Components/CICDHistory/service.tsx
Comment thread src/Shared/Components/CICDHistory/ResourceConflictDeployDialog.tsx
Comment thread src/Shared/Components/CICDHistory/ResourceConflictDetailsModal.tsx
Comment thread src/Shared/Components/CICDHistory/constants.tsx
Comment thread src/Shared/Components/CICDHistory/ConflictedResourcesTable.tsx
Comment thread src/Shared/Components/CICDHistory/ResourceConflictDeployDialog.tsx
Comment thread src/Shared/Components/CICDHistory/TriggerDetails.tsx
Comment thread src/Shared/Components/CICDHistory/types.tsx Outdated
Comment thread src/Shared/Helpers.tsx
Comment thread src/Shared/Components/CICDHistory/utils.tsx
vivek-devtron
vivek-devtron previously approved these changes Dec 10, 2025
vivek-devtron
vivek-devtron previously approved these changes Dec 12, 2025
arunjaindev
arunjaindev previously approved these changes Dec 12, 2025
vivek-devtron
vivek-devtron previously approved these changes Dec 12, 2025
@AbhishekA1509 AbhishekA1509 merged commit 12f9a58 into main Dec 12, 2025
6 checks passed
@AbhishekA1509 AbhishekA1509 deleted the feat/resource-conflict-main branch December 12, 2025 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants